import request from "../utils/reuqest.js";
// 登录
export const api_login = (data) => request.post("login", data);
//用户列表
export const api_query = data => request.get("users", data)
    //修改用户状态
export const api_state = ({ uId, type }) => request.put(`users/${uId}/state/${type}`)
    //分配角色的api
export const api_setRole = (data) => request.put(`users/${data.uId}/role`, data)
    //添加用户
export const api_users = (data) => request.post("users", data)
    //删除用户
export const api_del = (data) => request.delte(`users/${data.id}`, data)
    // 删除角色
export const api_dels = (data) => request.delte(`roles/${data.id}`, data)
    //添加角色
export const api_userss = (data) => request.post("/roles", data)
export const api_update = (data) => request.put(`roles/${data.id}`, data)